These routines allow programmers to access nShell variables from within external commands.
NSH_var_env
-----------
int NSH_var_env(Str32 name, Str255 value);
PARAMETERS
Str32 name address of a name to be searched
Str255 value address to receive the variable's value
RETURNS
0 found
others not found
PROCESS
This routine searches the shell environment for the named variable. If it is located, the value of that variable is copied to the passed string.
NSH_var_set
-----------
int NSH_var_set(Str32 name, Str255 value);
PARAMETERS
Str32 name address of a name to be searched
Str255 value address to receive the variable's value
RETURNS
0 success
others error
PROCESS
This routine searches the shell environment for the named variable. If that variable is not located, a new variable is created. The value of the passed string is copied to the shell variable.
NSH_var_unset
-------------
void NSH_var_unset(Str32 name);
PARAMETERS
Str32 name address of a variable name
RETURNS
0 found and deleted
1 not found
PROCESS
This routine searches the shell environment for the named variable. If it is located, that variable is deleted.